package com.xhqgov.manage.vo;

import com.github.pagehelper.util.StringUtil;
import com.xhqgov.manage.quartz.AccessTokenQuartz;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class AuthHelper {
    @Resource
    private AccessTokenQuartz accessTokenQuartz;

    private static String ACCESS_TOKEN;

    private static String TICKET;

    public  String getAccessToken() {
        if (StringUtil.isEmpty(ACCESS_TOKEN)) {
            accessTokenQuartz.getAccessToken();
        }
        return ACCESS_TOKEN;
    }

    public  void setAccessToken(String accessToken) {
        ACCESS_TOKEN = accessToken;
    }

    public  String getTICKET() {
        return TICKET;
    }

    public  void setTICKET(String TICKET) {
        AuthHelper.TICKET = TICKET;
    }
}
